package kr.hkit.PowerJava.chapter20;

import java.util.Calendar;
import java.util.Date;

public class DateEx {
public static void main(String[] args) {
	Date d = new Date();
	
	System.out.println(d);
	System.out.println("년도 : " +(1900+d.getYear()));
	System.out.println("월 : "+(d.getMonth()+1));
	System.out.println("일 : "+ d.getDate());
	System.out.println("요일 : "+ (d.getDay()+1));
	
    Calendar cal = Calendar.getInstance();
    System.out.println(cal);
    System.out.print(cal.get(Calendar.YEAR)+"년 ");
    System.out.print(cal.get(Calendar.MONTH)+1+"월 ");
    System.out.print(cal.get(Calendar.DATE)+"일 ");
    

}
}
